home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / RTLWIN16.PAK / DDE.H < prev    next >
C/C++ Source or Header  |  1997-05-06  |  5KB  |  157 lines

  1. /*****************************************************************************\
  2. *                                                                             *
  3. * dde.h -       Dynamic Data Exchange structures and definitions              *
  4. *                                                                             *
  5. \*****************************************************************************/
  6.  
  7. /* $Copyright: 1994$ */
  8.  
  9. #ifndef __DDE_H         /* prevent multiple includes */
  10. #define __DDE_H
  11.  
  12. #ifndef RC_INVOKED
  13. #pragma pack(push, 1)   /* Assume byte packing throughout */
  14. #pragma warn -bbf       /* Turn off warning about bitfields */
  15. #endif  /* RC_INVOKED */
  16.  
  17. #ifndef __WINDOWS_H
  18. #include <windows.h>    /* <windows.h> must be included */
  19. #endif  /* __WINDOWS_H */
  20.  
  21. #ifndef RC_INVOKED
  22. #pragma warn -bbf               /* Turn off warning about bitfields */
  23. #endif  /* RC_INVOKED */
  24.  
  25. #ifdef __cplusplus
  26. extern "C" {            /* Assume C declarations for C++ */
  27. #endif  /* __cplusplus */
  28.  
  29. /* DDE window messages */
  30.  
  31. #define WM_DDE_FIRST        0x03E0
  32. #define WM_DDE_INITIATE     (WM_DDE_FIRST)
  33. #define WM_DDE_TERMINATE    (WM_DDE_FIRST+1)
  34. #define WM_DDE_ADVISE       (WM_DDE_FIRST+2)
  35. #define WM_DDE_UNADVISE     (WM_DDE_FIRST+3)
  36. #define WM_DDE_ACK          (WM_DDE_FIRST+4)
  37. #define WM_DDE_DATA         (WM_DDE_FIRST+5)
  38. #define WM_DDE_REQUEST      (WM_DDE_FIRST+6)
  39. #define WM_DDE_POKE         (WM_DDE_FIRST+7)
  40. #define WM_DDE_EXECUTE      (WM_DDE_FIRST+8)
  41. #define WM_DDE_LAST         (WM_DDE_FIRST+8)
  42.  
  43. /****************************************************************************\
  44. *       DDEACK structure
  45. *
  46. *       Structure of wStatus (LOWORD(lParam)) in WM_DDE_ACK message
  47. *       sent in response to a WM_DDE_DATA, WM_DDE_REQUEST, WM_DDE_POKE,
  48. *       WM_DDE_ADVISE, or WM_DDE_UNADVISE message.
  49. *
  50. \****************************************************************************/
  51.  
  52. typedef struct tagDDEACK
  53. {
  54.     WORD    bAppReturnCode:8,
  55.             reserved:6,
  56.             fBusy:1,
  57.             fAck:1;
  58. } DDEACK;
  59.  
  60. /****************************************************************************\
  61. *       DDEADVISE structure
  62. *
  63. *       WM_DDE_ADVISE parameter structure for hOptions (LOWORD(lParam))
  64. *
  65. \****************************************************************************/
  66.  
  67. typedef struct tagDDEADVISE
  68. {
  69.     WORD    reserved:14,
  70.             fDeferUpd:1,
  71.             fAckReq:1;
  72.     short   cfFormat;
  73. } DDEADVISE;
  74.  
  75. /****************************************************************************\
  76. *       DDEDATA structure
  77. *
  78. *       WM_DDE_DATA parameter structure for hData (LOWORD(lParam)).
  79. *       The actual size of this structure depends on the size of
  80. *       the Value array.
  81. *
  82. \****************************************************************************/
  83.  
  84. typedef struct tagDDEDATA
  85. {
  86.     WORD    unused:12,
  87.             fResponse:1,
  88.             fRelease:1,
  89.             reserved:1,
  90.             fAckReq:1;
  91.     short   cfFormat;
  92.     BYTE     Value[1];
  93. } DDEDATA;
  94.  
  95.  
  96. /****************************************************************************\
  97. *       DDEPOKE structure
  98. *
  99. *       WM_DDE_POKE parameter structure for hData (LOWORD(lParam)).
  100. *       The actual size of this structure depends on the size of
  101. *       the Value array.
  102. *
  103. \****************************************************************************/
  104.  
  105. typedef struct tagDDEPOKE
  106. {
  107.     WORD    unused:13,  /* Earlier versions of DDE.H incorrectly */
  108.                         /* 12 unused bits.                       */
  109.             fRelease:1,
  110.             fReserved:2;
  111.     short   cfFormat;
  112.     BYTE    Value[1];   /* This member was named rgb[1] in previous */
  113.                         /* versions of DDE.H                        */
  114.  
  115. } DDEPOKE;
  116.  
  117. /****************************************************************************\
  118. * The following typedef's were used in previous versions of the Windows SDK.
  119. * They are still valid.  The above typedef's define exactly the same structures
  120. * as those below.  The above typedef names are recommended, however, as they
  121. * are more meaningful.
  122. *
  123. * Note that the DDEPOKE structure typedef'ed in earlier versions of DDE.H did
  124. * not correctly define the bit positions.
  125. \****************************************************************************/
  126.  
  127. typedef struct tagDDELN
  128. {
  129.     WORD    unused:13,
  130.             fRelease:1,
  131.             fDeferUpd:1,
  132.             fAckReq:1;
  133.     short   cfFormat;
  134. } DDELN;
  135.  
  136. typedef struct tagDDEUP
  137. {
  138.     WORD    unused:12,
  139.             fAck:1,
  140.             fRelease:1,
  141.             fReserved:1,
  142.             fAckReq:1;
  143.     short   cfFormat;
  144.     BYTE    rgb[1];
  145. } DDEUP;
  146.  
  147. #ifdef __cplusplus
  148. }                       /* End of extern "C" { */
  149. #endif  /* __cplusplus */
  150.  
  151. #ifndef RC_INVOKED
  152. #pragma pack(pop)       /* Revert to default packing */
  153. #pragma warn .bbf       /* Revert to default warning about bitfields */
  154. #endif  /* RC_INVOKED */
  155.  
  156. #endif  /* __DDE_H */
  157.